memory_alphafandomcom-20200223-history
Forum:Tooltips
Is there a way to create specific tooltips. Since it was decided on MA-fr to use english episodes titles and redirect others (up to 3-4 french translations), there are a few users who would prefer use the french translation, but I refuse to feature both (too much time and problems). So I would like to know if it is possible to show a specific tooltip including all the translations when the mouse comes over the english title ? For exemple : "The Q and the Grey" would show "Autant en emportent les Q" / "Enigme et Qonnaissance" / "Q-uerelle de succession" in the tooltip. - From Cardassia with pain 23:17, 4 January 2007 (UTC) :In theory, Yes, although that would mean some work with templates, possibly article subpages and CSS. You will probably want it to be consistent for all episode titles, so it needs to be templated - any episode reference would need to be replaced with a template call like . :This template would look like a standard episode reference when transcluded, but would need to have some "extra formatting", probably some HTML container that is initially invisible, but visible on mouseover (controlled via CSS). :As a last step, the content of that container would need to be consistent data about alternative episode titles - so probably another template call, transcluding a list of alternate episode titles from a subpage of any given episode (for example: ). :If you want to start something like this, I could help you with it... unless someone finds a better way to do it... ;) -- Cid Highwind 23:36, 4 January 2007 (UTC) :Splarka just provided Template:Linktip, thus solving the actual "tooltip" part of your question. If you just need tooltips in some specific cases, this might be what you need. Otherwise, that could be worked into my suggestion above, removing at least the need to fudge the CSS. -- Cid Highwind 01:16, 5 January 2007 (UTC) The problem with that method is that it would take more time and become more complex to edit : whereas before The Q and the Grey. It also needs to look each time at the series list to check the translations. But I think that problem could be resolved by a bot. Furthermore, it would be very confusing for new and irregular users when they will be confronted with that template. So I think a more simple method like the you proposed, is a better way to do it. - From Cardassia with pain 12:05, 5 January 2007 (UTC) ::Why not store the new names on a subpage of the episode? That way you could call and have it turned into whatever format you want plus }} the page The Q and the Grey/names would then contain the list "The Q and the Grey" / "Autant en emportent les Q" / "Enigme et Qonnaissance" / "Q-uerelle de succession" -- Kobi 15:40, 5 January 2007 (UTC) OK, I've got it working. I took Kobi's suggestion above and used it to modify Cid's template and Sparkla's template to incorporate the tooltips. Cid's "EpRef" template calls , so the tooltips are carried over to it as well. If an episode has one or more alternate titles in Template:Titles/Episode name, the template will use those titles in a tooltip. If the Template:Titles/Episode name file doesn't exist or is empty, the normal tooltip will be presented (i.e. the link name). The title(s) in the Template:Titles/Episode name file must not have quote marks, or the alternate tooltips will not be displayed; instead, the default tooltips will be used. (There are most likely characters other than quote marks that will mess up the mechanism as well; some trial and error will probably be necessary.) See Template:Titles/The Q and the Grey for an example of a valid titles file. Here are some example episodes: * ::an episode with "(episode)" appended to it. Note that the template automatically looks first for an article named "Episode name (episode)"; if it finds it, it uses it. If not, it looks for an article named just "Episode". In either case, it creates the link text without the "(episode)" text. * ::an episode without the appended "(episode)". Neither of the above articles have an xxx/titles file, so they both use the default tooltips, the link name. * ::an episode with an alternate titles file. The default tooltip is replaced by a list of alternate episode titles. I think this should all work fine now. Let me know if there are any problems (and thanks to Cid and Sparkla for the work they did in creating the templates I worked with and modified). -- Renegade54 22:35, 5 January 2007 (UTC) Great job, thanks to all. For information, I also just noticed that tooltips don't like specific characters. Is it possible to choose whether or not the "TOS:" link appears with "EpRef" because sometime it would become redundant : * and ; * List TNG: ** ** ** ** - From Cardassia with pain 23:26, 5 January 2007 (UTC) Maybe, 6 templates should be created based on "EpRef" : * * * * * * " }:" on "EpRef" could that way be transformed with TOS:, ... which would be easier for users to format : TOS: Arena would become rather than . In that way, there's less problem for formatting (no " forgotten for example). - From Cardassia with pain 23:38, 5 January 2007 (UTC) :Well, "EpRef" can take more that one episode. . In the lists, you can might just use . Anyway, I'm completely against the idea of sub-pages in the main namespace. those need to be moved into Template:. I'm not even sure why they are turned on in the main namespace anyway. The six series templates that call EpRef are already planned by Cid. The is for films. This is also part of a category thing for image galleries that he is working on. --Bp 23:46, 5 January 2007 (UTC) Fine, then revert the whole damn thing. The hell with it. -- Renegade54 00:30, 6 January 2007 (UTC) :I just think the alt-name pages need to be moved out of main namespace. I'm not suggesting to revert anything. --Bp 03:07, 6 January 2007 (UTC) Sorry about that, I was tired and cranky from working a problem at work all day and into the evening. I thought about it a bit, and it would be just as easy to rework it to use something like Template:Titles/Episode name, and then they'd all be in one place. What do you think about that? -- Renegade54 05:32, 6 January 2007 (UTC) OK, I've revised the template to use the Template namespace instead of the main one, and revised my explanation above to reflect that. Works just fine. :) -- Renegade54 05:45, 6 January 2007 (UTC) :Nice work, Renegade. :) I'm not sure we'll really need alternate titles on MA/en, but it will definitely be a good thing for the other language versions. -- Cid Highwind 17:57, 6 January 2007 (UTC) Thanks. :) You're right, we probably don't need them, but this is where I do my work! heh I figured that whoever needed or wanted them could just copy them from here. Plus, it never hurts to have consistency across the various language versions (where we can or it makes sense, at least). -- Renegade54 21:24, 6 January 2007 (UTC)